#触发编译以获取弓

#语法检查
$scoreboard players set #C temp $(can_use)
execute if score #C temp matches 0 run tellraw @a [{"text": "can_use只能为-1或1..","color": "red"}]
execute if score #C temp matches ..-2 run tellraw @a [{"text": "can_use只能为-1或1..","color": "red"}]
execute if score #C temp matches 0 run return run scoreboard players reset #C temp
execute if score #C temp matches ..-2 run return run scoreboard players reset #C temp
scoreboard players reset #C temp
$execute unless data storage dab:system gameContents.bow[{id:"$(id)"}] run return run tellraw @a [{"text": "指定ID物品不存在","color":"red"}]

#compiler
$function dab:system/register/bow/item_compiler/compile {id:"$(id)",can_use_count:$(can_use)}